package com.yh.workbill.ui.leaseInfo;

import com.yh.workbill.App;
import com.yh.workbill.db.UnitCompany;
import com.yh.workbill.db.UnitCompanyDao;

import java.util.List;

import androidx.lifecycle.LiveData;

public class LeaseInfoRepository {
    private UnitCompanyDao dao;
    public LiveData<List<UnitCompany>> data;

    public LeaseInfoRepository() {
        dao = App.appDataBase.getUnitCompanyDao();
        this.data = dao.getUnitComanys();
    }

    public void del(UnitCompany unitCompany) {
        dao.delect(unitCompany);
    }

    public void add(UnitCompany unitCompany) {
        dao.add(unitCompany);
    }
}
